package com.bridgeintelligent.tag.remotefile.fastdfs;

import java.util.Properties;

public class FastDFSConfigProps {
    private String connectTimeout;
    private String networkTimeout;
    private String charset;
    private String trackerServer;
    private String tempPath;
    private Http http;

    public static class Http {
        private String trackerHttpPort;
        private String antiStealToken;
        private String secretKey;

        public String getTrackerHttpPort() {
            return trackerHttpPort;
        }

        public void setTrackerHttpPort(String trackerHttpPort) {
            this.trackerHttpPort = trackerHttpPort;
        }

        public String getAntiStealToken() {
            return antiStealToken;
        }

        public void setAntiStealToken(String antiStealToken) {
            this.antiStealToken = antiStealToken;
        }

        public String getSecretKey() {
            return secretKey;
        }

        public void setSecretKey(String secretKey) {
            this.secretKey = secretKey;
        }
    }

    public Properties getProperties() {
        Properties props = new Properties();
        props.put("fastdfs.connect_timeout", getConnectTimeout());
        props.put("fastdfs.network_timeout", getNetworkTimeout());
        props.put("fastdfs.charset", getCharset());
        props.put("fastdfs.tracker_servers", getTrackerServer());
        props.put("http.tracker_http_port", http.getTrackerHttpPort());
        props.put("http.anti_steal_token", http.getAntiStealToken());
        props.put("http.secret_key", http.getSecretKey());
        return props;
    }

    public String getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(String connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public String getNetworkTimeout() {
        return networkTimeout;
    }

    public void setNetworkTimeout(String networkTimeout) {
        this.networkTimeout = networkTimeout;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public String getTrackerServer() {
        return trackerServer;
    }

    public void setTrackerServer(String trackerServer) {
        this.trackerServer = trackerServer;
    }

    public String getTempPath() {
        return tempPath;
    }

    public void setTempPath(String tempPath) {
        this.tempPath = tempPath;
    }

    public Http getHttp() {
        return http;
    }

    public void setHttp(Http http) {
        this.http = http;
    }
}
